<!DOCTYPE html>
<html class="pixel-ratio-1" style="background-color: #f1f1f1">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
        <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="expires" content="0" />
        <script src="../../../../public/vendor/flexible/flexible.js"></script>
        <title>销售订单-详情</title>
        <link rel="stylesheet" type="text/css" href="../../../../public/vendor/weui/weui.min.css" />
        <link rel="stylesheet" type="text/css" href="../../../../public/css/common.css" />
        <link rel="stylesheet" type="text/css" href="../../../../public/css/iconfont/iconfont.css" />
        <link rel="stylesheet" href="../../../../public/vendor/weui/jquery-weui.css" />
        <link rel="stylesheet" href="../../../../public/vendor/select2/select2.css" />
        <link rel="stylesheet" href="../../../../public/css/features/breedsales/saleorders/detailssaleorders.css" />
        <script id="looksalesplanmain-template" type="text/x-template">
            <div class='entrycon'>
                <h4 class="plantails-head" style="padding-top: 10px;font-size: 17px;">单据信息</h4>
            </div>
            <div class="report-contents-item-box">
                <div class="weui-cell materialinfo">
                    <div class="weui-cell__hd"><label class="weui-label">单据编号</label></div>
                    <div class="weui-cell__bd">
                        {{=it.billNo}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">业务日期</label></div>
                    <div class="weui-cell__bd">
                        {{=moment(it.bizDate).format('YYYY-MM-DD')}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">销售组织</label></div>
                    <div class="weui-cell__bd">
                        {{=it.saleOrgName}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">销售员</label></div>
                    <div class="weui-cell__bd">
                        {{=it.salePerName}}({{=it.salePerNumCode}})
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">客户信息</label></div>
                    <div class="weui-cell__bd">
                        {{=it.cstmName}}( {{=it.cstmNumCode}})
                    </div>
                </div>
                  <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">猪只类型</label></div>
                    <div class="weui-cell__bd">
                        {{=it.pigTypeName}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">总头数(头)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(it.totalCount,0)}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">总价(元)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(it.totalPrice)}}
                    </div>
                </div>
                <!--{{? Utils.IsNotNull(it.totalPrice)}}
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">总价(元)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(it.totalPrice)}}
                    </div>
                </div>
                {{??}}
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">预收款(元)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(it.preSaleAmount)}}
                    </div>
                </div>
                {{?}}-->
                {{? Utils.IsNotNull(it.attaches)}}
                <div class="weui-cell">
                    <div style="padding: 10px 10px;">
                        <div class="weui-cell__hd"><label class="weui-label">附件</label></div>
                        <div class="weui-cells-border weui-cells_form" id="uploader" style="margin-top: -10px;">
                            <div class="weui-cell" style='padding: 16px 15px;'>
                                <div class="weui-cell__bd">
                                    <div class="weui-uploader">
                                        <div class="weui-uploader__bd">
                                            <ul class="weui-uploader__files" id="uploaderFiles"></ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                {{?}}
                <div class="weui-cell">
                    <div>
                        <div class="weui-uploader__hd">
                            <p class="weui-uploader__title">备注</p>
                        </div>
                        <textarea class="weui-textarea remark" rows="1" name="tags" data-plugin="maxlength"
                                  data-placement="bottom-right-inside" readonly="readonly">{{=it.remark}}</textarea>
                    </div>
                </div>
            </div>
        </script>

        <script id="orderAdvances-template" type="text/x-template">
            <div class='entrycon'>
                <h4 class="plantails-head" style="padding-top: 10px;font-size: 17px;">收款信息</h4>
            </div>
            <div class="report-contents-item-box">
                <div class="weui-cell materialinfo">
                    <div class="weui-cell__hd"><label class="weui-label">订单金额(元)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(it.orderAmount)}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">预收款金额(元)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(it.predictAmount)}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label" style="width:150px">结算收款金额(元)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(it.settlementPayment)}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">创建信息</label></div>
                    <div class="weui-cell__bd">
                        {{=it.creatorName}}：{{=it.createTime}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">最后修改信息</label></div>
                    <div class="weui-cell__bd">
                        {{=it.lastUpdaterName}}：{{=it.lastUpdateTime}}
                    </div>
                </div>
                {{? Utils.IsNotNull(it.attaches)}}
                <div class="weui-cell">
                    <div style="padding: 10px 10px;">
                        <div class="weui-cell__hd"><label class="weui-label">附件</label></div>
                        <div class="weui-cells-border weui-cells_form" id="uploader" style="margin-top: -10px;">
                            <div class="weui-cell" style='padding: 16px 15px;'>
                                <div class="weui-cell__bd">
                                    <div class="weui-uploader">
                                        <div class="weui-uploader__bd">
                                            <ul class="weui-uploader__files" id="advance-uploaderFiles"></ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                {{?}}
            </div>
        </script>
        <script id="looksalesplan-template" type="text/x-template">
                <div class='entrycon'>
                    <h4 class="plantails-head" style="padding-top: 10px;font-size: 17px;">销售订单明细</h4>
                </div>
                {{~ it.entreis :value:index}}
            <div class="report-contents-item-box">
                {{? Utils.IsNotNull(value.count)}}
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">是否已确认</label></div>
                    <div class="weui-cell__bd">是</div>
                </div>
                {{??}}
                <div class="weui-cell" style="background-color: wheat;">
                    <div class="weui-cell__hd"><label class="weui-label">是否已确认</label></div>
                    <div class="weui-cell__bd">否</div>
                </div>
                {{?}}
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">农场</label></div>
                    <div class="weui-cell__bd">
                        {{=value.farmOrgName}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">养殖批次</label></div>
                    <div class="weui-cell__bd">
                        {{=value.breedBatchName}}
                    </div>
                </div>
                <div class="weui-cell materialinfo">
                    <div class="weui-cell__hd"><label class="weui-label">物料</label></div>
                    <div class="weui-cell__bd">
                        {{=value.materialName}}({{=value.materialNumCode}})
                    </div>
                </div>
                <div class="weui-cell materialinfo">
                    <div class="weui-cell__hd"><label class="weui-label">销售品类</label></div>
                    <div class="weui-cell__bd">
                        {{=value.specLevel}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">销售数量(头)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(value.orderCount,0)}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">出库数量(头)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(value.countNum,0)}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">重量(kg)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(value.weight)}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">预估均重(kg)</label></div>
                    <div class="weui-cell__bd">
                        {{=Utils.toThousands(value.estimatedAvgWeight)}}
                    </div>
                </div>
                {{? Utils.IsNotNull(value.weight)}}
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">出库均重(kg)</label></div>
                    <div class="weui-cell__bd">
                        {{=(value.weight /value.countNum).toFixed(2)}}
                    </div>
                </div>
                {{??}}
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">出库均重(kg)</label></div>
                    <div class="weui-cell__bd">
                        0
                    </div>
                </div>
                {{?}}
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">单价</label></div>
                    <div class="weui-cell__bd">
                        {{=value.unitPrice}}元/{{=value.baseMeasureUnit}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">司机姓名</label></div>
                    <div class="weui-cell__bd">
                        {{=value.deiverName}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">司机电话号码</label></div>
                    <div class="weui-cell__bd">
                        {{=value.deiverPhone}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">发货地址</label></div>
                    <div class="weui-cell__bd">
                        {{=value.receiveAddress}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">收货地址</label></div>
                    <div class="weui-cell__bd">
                        {{=value.detailDeliveryAddress}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">运输车牌</label></div>
                    <div class="weui-cell__bd">
                        {{=value.carNo}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">中转车牌</label></div>
                    <div class="weui-cell__bd">
                        {{=value.transferCarNo}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">是否赠送</label></div>
                    <div class="weui-cell__bd">
                        {{=value.isGift==true?"是":"否"}}
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">备注</label></div>
                    <div class="weui-cell__bd">
                        {{=value?.remark||'' }}
                    </div>
                </div>
                {{? it.entry.billStatus===2}}
                <div class="weui-cell plantails" style="display: flex;justify-content: space-around;padding:0px" id="operate{{=value.seq}}">
                    <div style="flex:1;text-align:center;border-right: 1px solid #e6e6e6;padding:10px">
                        <div class="operation-button" data-flag="table-click-vehicle" data-seq="{{=value.seq}}" data-carNo="{{=value.carNo}}" data-deiverId="{{=value.deiverId}}" data-count="{{=value.count}}"
                             data-breedBatchName="{{=value.breedBatchName}}" data-orderCount="{{=value.orderCount}}" data-weight="{{=value.weight}}" data-deiverName="{{=value.deiverName}}" data-deiverPhone="{{=value.deiverPhone}}" data-deiverNumCode="{{=value.deiverNumCode}}"
                             data-transferCarNo="{{=value.transferCarNo}}" data-cstm="{{=it.entry.cstmName}}({{=it.entry.cstmNumCode}})" data-bizDate="{{=it.entry.bizDate}}" data-salePer="{{=it.entry.salePerName}}({{=it.entry.salePerNumCode}})"
                             data-farmOrgName="{{=value.farmOrgName}}">
                            <i class="icon iconfont icon-cheliangdengji icon-font-size-24" style="font-size: 28px; color: #fe8636fd"
                               aria-hidden="true"></i> &nbsp;&nbsp;变更订单车辆
                        </div>
                    </div>
                    <div style="flex:1;text-align:center;padding:10px">
                        <div class="operation-button" data-flag="table-click-edit" data-seq="{{=value.seq}}" data-count="{{=value.count}}" data-weight="{{=value.weight}}" data-attaches="{{=value.attaches}}" data-unitPrice="{{=value.unitPrice}}"
                             data-material="{{=value.materialName}}({{=value.materialNumCode}})" data-breedBatchId="{{=value.breedBatchId}}" data-breedBatchName="{{=value.breedBatchName}}" data-orderCount="{{=value.orderCount}}" data-estimatedAvgWeight="{{=value.estimatedAvgWeight}}"
                             data-cstm="{{=it.entry.cstmName}}({{=it.entry.cstmNumCode}})" data-salePer="{{=it.entry.salePerName}}({{=it.entry.salePerNumCode}})" data-farmOrgId="{{=value.farmOrgId}}" data-farmOrgName="{{=value.farmOrgName}}" data-deiver="{{=value.deiverName}}({{=value.deiverPhone}})"
                             data-carNo="{{=value.carNo}}" data-transferCarNo="{{=value.transferCarNo}}" data-saleOrgId="{{=it.entry.saleOrgId}}" data-saleOrgName="{{=it.entry.saleOrgName}}" data-bizDate="{{=it.entry.bizDate}}" data-cstmId="{{=it.entry.cstmId}}" data-cstmName="{{=it.entry.cstmName}}"
                             data-isGift="{{=value.isGift}}" data-materialId="{{=value.materialId}}" data-deliveryRegion="{{=value.deliveryRegion}}" data-shipRegion="{{=value.shipRegion}}" data-pigType="{{=it.entry.pigType}}" data-baseMeasureUnit="{{=value.baseMeasureUnit}}"  data-materialName="{{=value.materialName}}"
                             data-materialNumCode="{{=value.materialNumCode}}" data-subMeasureUnit="{{=value.subMeasureUnit}}" data-specLevelId="{{=value.specLevelId}}"  data-deiverName="{{=value.deiverName}}" data-deiverPhone="{{=value.deiverPhone}}" data-planOrderId="{{=value.planOrderId}}" data-billNo="{{=value.billNo}}"
                             data-receiveAddress="{{=value.receiveAddress}}"  data-detailDeliveryAddress="{{=value.detailDeliveryAddress}}">
                            <i class="icon iconfont icon-edit-no-border icon-font-size-24" style="font-size: 20px;color:#fe8636fd"
                               aria-hidden="true"></i> &nbsp;&nbsp;确认过磅信息
                        </div>
                    </div>
                </div>
                {{?}}
            </div>
                {{~}}
                <div class="report-contents-item-box operation ">
                    <div class="weui-cell operation-child">
                        <a href="javascript:;" class="weui-btn weui-btn_primary"
                           style="width: 100%;border-radius:8px;margin-top: 0px;margin-right: 0px;" id="returnlist"
                           v-on:click="returnlist">返回列表</a>
                    </div>
                </div>
        </script>
    </head>

    <body>
        <div id="main-looksalesplan">
            <div id="looksalesplan">
                <div id="looksalesMain"></div>
                <div id="orderAdvances"></div>
                <div id="looksalesEntry"></div>
            </div>
        </div>

        <script type="text/javascript" src="../../../../public/vendor/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/vue/vue.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/moment/moment.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/weui/weui.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/weui/jquery-weui.min.js"></script>
        <script type="text/javascript" src="../../../../public/js/common/iosadaptation.js"></script>
        <script type="text/javascript" src="../../../../public/js/config/utils.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/select2/select2.full.min.js"></script>
        <script type="text/javascript" src="../../../../public/vendor/select2/i18n/zh-CN.js"></script>
        <script type="text/javascript" src="../../../../public/js/common/iosadaptation.js"></script>

        <script type="module" src="../../../../public/js/features/breedsales/saleorders/detailssaleorders.js"></script>
    </body>
</html>
